<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <title>Document</title>
</head>
<body>   
    <button type="button" class="get">get</button>
    <button type="button" class="post">post</button>
    <input type="text" name="UserCode"  placeholder="请输入你的名字">
    <input type="text" name="UserPass"  placeholder="请输入你的密码">
    <script>
            const config = {
      headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
    }
        document.querySelector(".get").onclick = function(){
            axios.get("http://183.237.61.74:49081/Service.asmx/GetMenuTypes",{'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' })
            .then(function(response){
                console.log(response._.toString(value));
            },function(err){
                console.log(err);
            })
        }   
         
        
        document.querySelector(".post").onclick = function(){        
            var Code = document.getElementsByTagName("input")[0].value;
            var Pass =  document.getElementsByTagName("input")[1].value;
            var jonprm ={UserCode: Code, UserPass:Pass};
            console.log(jonprm);
            const parames = JSON.stringify(jonprm);
		    axios.post("http://192.168.3.251:8081/Service.asmx/CheckSysUser",parames,config)
		   .then(function(response){
			console.log(response);
		},function(err){
			console.log(err);
		})       
        


        }
    </script>
</body>
</html>
